home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / lprsr / tstwr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-03  |  2.7 KB  |  69 lines

  1. /************************************************************************/
  2. /*                                                                      */
  3. /*    spoold.c                                                            */
  4. /*                                                                      */
  5. /*    Durch bloßes Ändern der Extension im Dateinamen, läßt sich Pro-   */
  6. /*    gramm als normale GEM-Anwendung oder aber als Accessory betrei-   */
  7. /*    ben.                                                              */
  8. /*    Das Programm zeigt in einem Fenster die aktuellen Neuigkeiten an. */
  9. /*                                                                      */
  10. /*    Copyright (c)  FORTEC/pm 1989                                     */
  11. /*                                                                      */
  12. /************************************************************************/
  13.  
  14. /* -------------------------------------------------------------------- */
  15. /*    Headerdateien einbinden.                                          */
  16. /* -------------------------------------------------------------------- */
  17.  
  18. #include <aes.h>
  19. #include <stdio.h>
  20. #include <tos.h>
  21. #include <vdi.h>
  22. #include <string.h>
  23. #include <stdlib.h>
  24. #include <ctype.h>
  25. #include <time.h>
  26. #include "tcpdef.h"
  27.  
  28. extern long oldgem;
  29. extern long grpgem;
  30. extern long oldt5;
  31. extern long grptrp;
  32. extern long * tab;
  33. extern int tabstart[], tabend;
  34. int fi = 0;
  35.  
  36. /* -------------------------------------------------------------------- */
  37. /*    main()                                                            */
  38. /*                                                                      */
  39. /*    Kernstück des Programms.                                          */
  40. /* -------------------------------------------------------------------- */
  41.  
  42. int main( void )
  43. {
  44.       printf("buffer at %lx\n",tabstart);
  45.       oldgem = (long)Setexc(33, (void (*)())&grpgem);
  46.       oldt5 = (long)Setexc(37, (void (*)())&grptrp);
  47.       Ptermres(_PgmSize,0);
  48. }
  49.  
  50. /* -------------------------------------------------------------------- */
  51. /*    End of SPOOLD.C                                                     */
  52. /* -------------------------------------------------------------------- */
  53.  
  54. void show(void)
  55. {
  56.  int F;
  57.  int i;
  58.  char text[100];
  59.  
  60.  sprintf(text,"C:\\tmp\\dumpfile.%d",fi++);
  61.  F = Fcreate(text,0);
  62.  for(i=0;i < 500;i++)
  63. {
  64.  sprintf(text,"%4x%04x %4x %4x%04x %04x %04x %4x%04x\r\n",tabstart[9*i],tabstart[(9*i)+1],tabstart[(9*i)+2],tabstart[(9*i)+3],tabstart[(9*i)+4],tabstart[(9*i)+5],tabstart[(9*i)+6],tabstart[(9*i)+7],tabstart[(9*i)+8]);
  65.  Fwrite(F,strlen(text),text);
  66. }
  67.  Fclose(F);
  68. }
  69.